function preloadImage(src,callback){
    var images=[];
	var len=src.length;
	var k=0;
	for(i in src){
		images[i] = new Image();
		jQuery(images[i]).
			load(function() {
				k+=1;
				if(k==len){
					if (callback)
						callback.call(images);
				};
			}).
			error(function() {
				if (callback)
					callback.call();
				return;
			}).
			attr("src", src[i]);
	};
	
};